<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\softDeletes;
use Jedrzej\Pimpable\PimpableTrait;
class LiveAnchor extends Model
{
    use HasFactory;
    use softDeletes;
    use PimpableTrait;

    /**
     *允许批量赋值的字段
     */
    public $fillable = [
        'name',
        'avatar',
        'wechat',
        'phone'
    ];

    /**
     * 可搜索的字段
     */
    public $searchable = [
        'phone',
        'is_show'
    ];

    /**
     * 默认id倒序
     */
    protected $defaultSortCriteria = ['id,desc'];
}
